package com.hnjfzn.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

@TableName("order")  // 对应数据库中的表名
public class Order {

    @TableId("order_id")  // 主键
    private Long orderId;

    @TableField("user_id")
    private Long userId;  // 与 sys_user 表中的用户ID关联

    @TableField("product_id")
    private Long productid;  // 订单号，唯一

    @TableField("order_date")
    private Date orderDate;  // 订单创建时间

    @TableField("status")
    private Integer status;  // 订单状态

    @TableField("total_amount")
    private BigDecimal totalAmount;  // 订单总金额

    @TableField("quantity")
    private Integer quantity;  // 订单总金额


    @TableField("address_id")
    private Long addressId;  // 送货地址ID

    @TableField("payment_status")
    private Integer paymentStatus;  // 支付状态

    @TableField("create_time")
    private Date createTime;  // 创建时间

    @TableField("update_time")
    private Date updateTime;  // 修改时间

    @TableField("create_by")
    private String createBy;  // 创建人

    @TableField("update_by")
    private String updateBy;  // 修改人

    @TableField("remark")
    private String remark;  // 备注

    // Getters and Setters

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getProductid() {
        return productid;
    }

    public void setProductid(Long productid) {
        this.productid = productid;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public Integer getPaymentStatus() {
        return paymentStatus;
    }

    public void setPaymentStatus(Integer paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
